import { kgjHttp as http } from '@/services/http';
import type { SortAndLimit, ListResult } from '@/types/api/common';

/** 推荐位商品列表 */
export const slotProductList = (payload: { data: any; params: SortAndLimit }) =>
  http<ListResult<any>, any, SortAndLimit>({ url: '/api/gold-crm/slot-product/list', method: 'post', ...payload });

/** 推荐商品编辑 */
export const slotProductEdit = (data: any) =>
  http<ListResult<any>, any>({ url: '/api/gold-crm/slot-product/edit', method: 'post', data });

/** 推荐商品添加 */
export const slotProductAdd = (data: any) =>
  http<ListResult<any>, any>({ url: '/api/gold-crm/slot-product/add', method: 'post', data });

/** 推荐商品删除 */
export const slotProductRemove = (id: string) =>
  http<ListResult<any>>({ url: '/api/gold-crm/slot-product/remove/{id}', method: 'post', args: { id } });
